import {observable, action} from 'mobx';
import appConfig from '../config/appConfig';
class AppStore {
  @observable appConfig={
    open:-1
  }

  @observable data = {
    isInit :false,

    taoBaoApi:{
      api:"https://eco.taobao.com/router/rest",
      app_key:'xxxx',
      app_secret :'xxxx',
      Pid:"xxxx",
      adzone_id:"xxxxx",
      tb_name:"星华就是我",


      SuperSearch: 'https://v2.api.haodanku.com/supersearch/apikey/{0}/keyword/{1}/back/50/min_id/{2}/tb_p/1/sort/{3}/is_tmall/0/is_coupon/1/limitrate/0',//超级搜索
      Swiper: "taobao.tbk.item.info.get",   //轮播图
      Similar:"https://v2.api.haodanku.com/get_similar_info/apikey/{0}/itemid/{1}",  //猜你喜欢、

      haoDanKey :'baoganxing',
      tb_items_material_data:"https://v2.api.haodanku.com/tb_items_material_data/apikey/{0}/cat_id/{1}/back/50/min_id/{2}",//差异化货品API
      ienteeringitems:"https://v2.api.haodanku.com/get_orienteeringitems/apikey/{0}/back/50/min_id/{1}",//定向计划商品API
      low_price_Pinkage_data:"https://v2.api.haodanku.com/low_price_Pinkage_data/apikey/{0}/type/{1}/min_id/{2}/back/50" ,//精选低价包邮专区API
      deserve_item:"https://v2.api.haodanku.com/get_deserve_item/apikey/{0}/back/50",//今日值得买API
      //高佣专场商品
      highitems:"https://v2.api.haodanku.com/get_highitems/apikey/{0}/back/50/min_id/{1}",
      //分类
      super_classify:"https://v2.api.haodanku.com/super_classify/apikey/{0}",
      //爆款
      sales_list :"https://v2.api.haodanku.com/sales_list/apikey/{0}/sale_type/{1}/item_type/1/min_id/{2}/back/50",
      //抖音货
      trill_data:"https://v2.api.haodanku.com/get_trill_data/apikey/{0}/min_id/{1}/back/50/cat_id/0",
      //所有商品(大于多少优惠卷)
      allItem:"https://v2.api.haodanku.com/itemlist/apikey/{0}/nav/3/cid/0/back/50/min_id/{1}/coupon_min/{2}",
      //排除卷（非自己的联盟ID需要转化）
      coupons:"https://www.haodanku.com/allitem/get_allitem_list?keyword=&shopsearch=&brand_name=&cid=0&min_price=&max_price=&filtrate_type=&min_sale=&min_rate=&min_tkMoney=&min_avg=&min_coupon={0}&p={1}&shoptype=&discount=&favorites_count=&min_itemprice=&max_itemprice=&sort=1",
      //高佣转链
      ratesurl:"https://v2.api.haodanku.com/ratesurl",
      //首单礼金商品
      frist_order_items:"https://v2.api.haodanku.com/frist_order_items/apikey/{0}/back/50/min_id/{1}/cat_id/{2}/order/{3}"

    },
    jinDongApi:{
      app_key:"xxxx",
      app_secret:"xxxxx",
      siteId:"xxxxx",

      api:"https://yunshang-buyer-api.jcloudec.com",
      SuperSearch:'https://yunshang-buyer-api.jcloudec.com/item/search/searchCateItemByEs?_=',
      Swiper:"https://yunshang-buyer-api.jcloudec.com/item/search/queryCpsItemBaseInfo?_={0}&jdSkuId={1}",  //轮播图
      Similar:"https://yunshang-buyer-api.jcloudec.com/item/search/searchItemSaleTop?_="//猜你喜欢
    },
    pingDuoDuoApi:{
      api: 'https://gw-api.pinduoduo.com/api/router',
      client_id: 'xxxx',
      client_secret: 'xxxxx',
      pid:'xxxx',
      SuperSearch:"pdd.ddk.goods.search",
      Swiper:'pdd.ddk.goods.detail',
      PromotionUrl:"pdd.ddk.goods.promotion.url.generate"
    },

    //热搜
    hotKey: {

      url: 'https://v2.api.haodanku.com/hot_key/apikey/{0}',
    },
  };
}

const appStore = new AppStore();

export default appStore;
